package com.yc.documentLoanding;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;

public class TxtGenerator {

    public static void generateTxt(String content, String filePath) throws IOException {
        Files.write(Paths.get(filePath), content.getBytes("UTF-8"));
        System.out.println("TXT 文件已生成: " + filePath);
    }

    public static void main(String[] args) throws IOException {
        String text = ChineseTextGenerator.generateChineseText(500);
        generateTxt(text, "test_500_words.txt");
    }
}